package com.demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.domain.PracticeProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
public interface PracticeProjectDao extends BaseMapper<PracticeProject> {

//    查找所有比赛，按热度排序
    @Select("SELECT * FROM `tb_practice_project` \n" +
            "WHERE pp_popularity is not Null AND pp_id_delete = 0\n" +
            "ORDER BY pp_popularity DESC")
    public List<PracticeProject> selectAllByDESC();


}
